//
//  BCRecommendListAPI.m
//  BananaChat
//
//  Created by 于洪东 on 2019/11/2.
//  Copyright © 2019 香蕉. All rights reserved.
//

#import "BCRecommendListAPI.h"

@interface BCRecommendListAPI ()

@property (nonatomic,strong) NSString *pageSize;
@property (nonatomic,strong) NSString *gender;
@property (nonatomic,strong) NSString *pageIndex;

@end

@implementation BCRecommendListAPI

-(instancetype)initWithPageSize:(NSString *)pageSize gender:(NSString *)gender pageIndex:(NSString *)pageIndex{
    if (self = [super init]) {
        self.pageSize = pageSize;
        self.gender = gender;
        self.pageIndex = pageIndex;
    }
    return self;
}

-(NSString *)requestUrl{
    return @"/user/v1/getHotUserList";
}

-(YTKRequestMethod)requestMethod{
    return YTKRequestMethodPOST;
}

-(NSString *)baseUrl{
    return kBaseURL;
}

-(YTKRequestSerializerType)requestSerializerType{
    return YTKRequestSerializerTypeJSON;
}

-(id)requestArgument{
    NSMutableDictionary *paradic = [NSMutableDictionary dictionary];
    [BCTools xDic:paradic setObj:@(self.pageSize.intValue) forKey:@"pageSize"];
    [BCTools xDic:paradic setObj:@(self.pageIndex.intValue) forKey:@"pageIndex"];
    [BCTools xDic:paradic setObj:self.gender forKey:@"gender"];
    return paradic;
}


-(NSDictionary<NSString *,NSString *> *)requestHeaderFieldValueDictionary{
    NSMutableDictionary *headerdic = [NSMutableDictionary dictionary];
    [BCTools xDic:headerdic setObj:[BCTools getDeviceModel] forKey:@"phoneModel"];
    [BCTools xDic:headerdic setObj:[BCTools getDeviceOSVersion] forKey:@"phoneOsVersion"];
    [BCTools xDic:headerdic setObj:@"1.4.7" forKey:@"appVersion"];
    [BCTools xDic:headerdic setObj:@"com.dy.yingtaoliao" forKey:@"appBundleIdentifier"];
    [BCTools xDic:headerdic setObj:[BCTools getDeviceOSName] forKey:@"phoneOsType"];
    [BCTools xDic:headerdic setObj:[BCTools getIDFA] forKey:@"phoneDeviceId"];
    
    [BCTools xDic:headerdic setObj:@"/user/v1/getHotUserList_343b753725cb84945e9c3effe38cfb7e" forKey:@"requestId"];
    [BCTools xDic:headerdic setObj:@"0" forKey:@"userId"];
    
    return headerdic;
}




@end
